package mani.threads;

public class CreateAndRun implements Runnable{
	private int number;
	
	public CreateAndRun(int number){
		this.number = number;
	}

	public void run(){
		for(int i =0;i<5;i++){
			System.out.println(number+"--Current Thread is "+Thread.currentThread().getName());
			System.out.println(Thread.currentThread().getId());
			System.out.println(Thread.currentThread().getState());
			System.out.println(Thread.currentThread().getPriority());
			System.out.println(Thread.currentThread().getContextClassLoader().getClass());
			try{
				Thread.sleep(400);
			}catch(InterruptedException ie){
				ie.printStackTrace();
			}
		}
	}

}
